<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateShopCarTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('shop_car', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->timestamps();

            $table->integer('goods_id')->unsigned()->comment('商品');

            $table->integer('goods_sku_id')->unsigned()->comment('sku表id');

            $table->integer('num')->default(1)->unsigned()->comment('商品数量');

            $table->integer('status')->unsigned()->comment('状态，1选中，2非选');

            $table->integer('user_id')->unsigned()->comment('用户id');

            $table->integer('seller_id')->comment('商户id');

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('shop_car');
    }
}
